3.71 \(\int \csc ^2(c+d x) (a+b \sin ^2(c+d x)) \, dx\)

Optimal. Leaf size=16 \[ b x-\frac{a \cot (c+d x)}{d} \]

[Out]

b*x - (a*Cot[c + d*x])/d

________________________________________________________________________________________

Rubi [A]  time = 0.0232825, antiderivative size = 16, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {3012, 8} \[ b x-\frac{a \cot (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Int[Csc[c + d*x]^2*(a + b*Sin[c + d*x]^2),x]

[Out]

b*x - (a*Cot[c + d*x])/d

Rule 3012

Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(A*Cos[e
+ f*x]*(b*Sin[e + f*x])^(m + 1))/(b*f*(m + 1)), x] + Dist[(A*(m + 2) + C*(m + 1))/(b^2*(m + 1)), Int[(b*Sin[e
+ f*x])^(m + 2), x], x] /; FreeQ[{b, e, f, A, C}, x] && LtQ[m, -1]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \csc ^2(c+d x) \left (a+b \sin ^2(c+d x)\right ) \, dx &=-\frac{a \cot (c+d x)}{d}+b \int 1 \, dx\\ &=b x-\frac{a \cot (c+d x)}{d}\\ \end{align*}

Mathematica [A]  time = 0.0182045, size = 16, normalized size = 1. \[ b x-\frac{a \cot (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[c + d*x]^2*(a + b*Sin[c + d*x]^2),x]

[Out]

b*x - (a*Cot[c + d*x])/d

________________________________________________________________________________________

Maple [A]  time = 0.046, size = 22, normalized size = 1.4 \begin{align*}{\frac{-\cot \left ( dx+c \right ) a+ \left ( dx+c \right ) b}{d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(d*x+c)^2*(a+sin(d*x+c)^2*b),x)

[Out]

1/d*(-cot(d*x+c)*a+(d*x+c)*b)

________________________________________________________________________________________

Maxima [A]  time = 1.42677, size = 31, normalized size = 1.94 \begin{align*} \frac{{\left (d x + c\right )} b - \frac{a}{\tan \left (d x + c\right )}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2*(a+b*sin(d*x+c)^2),x, algorithm="maxima")

[Out]

((d*x + c)*b - a/tan(d*x + c))/d

________________________________________________________________________________________

Fricas [A]  time = 1.5839, size = 76, normalized size = 4.75 \begin{align*} \frac{b d x \sin \left (d x + c\right ) - a \cos \left (d x + c\right )}{d \sin \left (d x + c\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2*(a+b*sin(d*x+c)^2),x, algorithm="fricas")

[Out]

(b*d*x*sin(d*x + c) - a*cos(d*x + c))/(d*sin(d*x + c))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \sin ^{2}{\left (c + d x \right )}\right ) \csc ^{2}{\left (c + d x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)**2*(a+b*sin(d*x+c)**2),x)

[Out]

Integral((a + b*sin(c + d*x)**2)*csc(c + d*x)**2, x)

________________________________________________________________________________________

Giac [B]  time = 1.15831, size = 53, normalized size = 3.31 \begin{align*} \frac{2 \,{\left (d x + c\right )} b + a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - \frac{a}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2*(a+b*sin(d*x+c)^2),x, algorithm="giac")

[Out]

1/2*(2*(d*x + c)*b + a*tan(1/2*d*x + 1/2*c) - a/tan(1/2*d*x + 1/2*c))/d